import requests from '@/utils/request'
// 获取角色列表
export const getRoleList = (params) => requests({ url: '/roles', params })
// 获取角色数量
export const getRoleNum = () => requests({ url: '/roles/count' })
// 获取指定角色
export const getIdRole = (id) => requests({ url: '/roles/' + id })
// 新建角色
export const addRole = (data) => requests({ url: '/roles', data, method: 'POST' })
// 编辑角色
export const editRole = (data) => requests({ url: '/roles/' + data.id, method: 'put', data })
// 删除角色
export const delRole = (id) => requests({ url: '/roles/' + id, method: 'delete' })
